#ifndef ENTITY2D_H
#define ENTITY2D_H
#include "engine_api.h"
#include "MathDX.h"
#include "RenderTypes.h"
#include "Renderer.h"
namespace pg1{
	class ENGINE_API Entity2D{
	
	public:
		Entity2D();
		virtual ~Entity2D();

	public:
		void setPos(float fPosX,float fPosY);
		void setRotation(float fRotation);
		void setScale(float m_fScaleX,float m_fScaleY);

		float posX();
		float posY();
		float rotation() const;
		float scaleX() const;
		float scaleY() const;
		float prevPosX() const;
		float prevPosY() const;
		void returnToPos(float fPosX, float fPosY);
		void updateLocalTransformation();
		const Matrix transformationMatrix();
		void drawAABB(Renderer& rkRenderer) const;
	protected:
		float m_fPosX,m_fPosY;
		float m_fRotation;
		float m_fScaleX,m_fScaleY;

		
		

	protected:
		Matrix m_pkTransformationMatrix;
		float m_fPrevPosX, m_fPrevPosY;
	//Colisiones
	public:
		enum CollisionResult
		{
			CollisionVertical,
			CollisionHorizontal,
			NoCollision
		};

		CollisionResult checkCollision(Entity2D& rkEntity2D) const;
		//void drawAABB(Renderer& rkRenderer) const;
	
	};
}
#endif